<?php $post_style = array('style1'=>__( 'Left Side Image', THEME_NAME ), 'style2'=>__( 'Right Side Image', THEME_NAME ), 'style3'=>__( 'Large Image', THEME_NAME )); ?>

<!-- Post Style -->
<div class="admin-inside-box clearfix" style="border:1px solid #CCC; margin-bottom:10px;">
	<h3><?php _e('Post Styles', THEME_NAME); ?></h3>
	<div class="fields" style="margin-left:10px;">
		<input type="hidden" name="post_style_nonce" value="<?php echo wp_create_nonce( basename(__FILE__) ); ?>" />
		<?php
		foreach($post_style as $k=>$v):?>
			<p>
				<label>
					<input type="radio" name="post_style" value="<?php echo $k; ?>" <?php if ($style == $k) echo 'checked="checked"'; ?> />
					<?php echo $v;?>	
				</label>
			</p>
		<?php endforeach;?>
	</div>
</div>

<!-- Sidebar -->
<div class="admin-inside-box clearfix" style="border:1px solid #CCC; margin-bottom:10px;">
    <h3><?php _e('Custom Sidebar', THEME_NAME); ?></h3>
    <div class="field" style="margin-left:10px;">
        <p>
            <label for="custom-sidebar" style="width:30%; display:inline-block;"><?php _e('Choose Custom Sidebar', THEME_NAME); ?> :</label>
            <select name="wl_custom_sidebar" style="width:40%;">
                <?php foreach($sidebars as $k=>$v): ?>
                    <?php $selected = ($k == $value) ? 'selected="selected"' : ''; ?>
                    <option value="<?php echo $k; ?>" <?php echo $selected; ?>><?php echo $v['name']; ?></option>
                <?php endforeach; ?>
            </select>
        </p>
    </div>
</div>

<!-- Header Image -->
<div class="admin-inside-box clearfix" style="border:1px solid #CCC; margin-bottom:10px;">
	<h3><?php _e('Custom Header Banner', THEME_NAME); ?></h3>
    <div class="fields" style="margin:10px;">
        <p>
            <input type="hidden" name="page_header_nonce" value="<?php echo wp_create_nonce( basename(__FILE__) ); ?>" />
        </p>
        <p><label><?php _e( 'Header Image', THEME_NAME ); ?></label><br />
            <input type="text" class="widefat" name="header_image" value="<?php echo $image; ?>" style="width:70%;" />
            <input class="button" id="upload_header_image" value="<?php _e('Upload', THEME_NAME); ?>" type="button" />
        </p>
        <p>
            <label><?php _e( 'Header Title', THEME_NAME ); ?></label><br />
            <input type="text" class="widefat" name="header_title" value="<?php echo $title; ?>" style="width:80%;" />
        </p>
        <p>
            <label><?php _e( 'Header Description', THEME_NAME ); ?></label><br />
            <textarea class="widefat" name="header_desc" style="width:80%;" ><?php echo $desc; ?></textarea>
        </p>
        <script type="text/javascript">
        jQuery(document).ready(function($) 
		{
			var org_send_to_editor = window.send_to_editor;			
            // use WordPress media upload with thickbox file image uploading
            $("#upload_header_image").click(function() {
                form_field = $(this).prev("input");
				if('undefined' != form_field)
				{
					tb_show("", "media-upload.php?type=image&amp;TB_iframe=true");
					
					$("#TB_closeWindowButton, #TB_overlay").on('click', tb_ctrls);
					
					window.send_to_editor = function(html)
					{
						image_url = $(html).attr("href");
						$(form_field).val(image_url);
						tb_ctrls();
					}
					
					return false;
				}
            });
			
			function tb_ctrls()
			{
				tb_remove();
				window.send_to_editor = org_send_to_editor;
				$("#TB_closeWindowButton, #TB_overlay").off('click', tb_ctrls);
			}
        });
		
        </script>
    </div>
</div>

<!-- Post Style -->
<div class="admin-inside-box clearfix" style="border:1px solid #CCC; margin-bottom:10px;">
	<h3><?php _e('Post Meta', THEME_NAME); ?></h3>
	<div class="fields" style="margin-left:10px;">
        <p><label>
					<input type="checkbox" name="wl_post_meta" value="<?php echo 'show';?>" <?php if ($wl_post_meta == 'show') echo 'checked="checked"'; ?> />
					<?php echo _('Show Post Meta');?>	
			</label>
        </p>
	</div>
</div>

<!-- Sidebar -->